<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: ll
  Date: 2022/9/20
  Time: 11:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>一次请求</title>
</head>
<body>
<%
    //1. 定义图书列表
    List<String> books = new ArrayList<String>();
    books.add("《三国演义》");
    books.add("《水浒传》");
    books.add("《西游记》");
    books.add("《红楼梦》");
    //2. 将数据放到request作用域：
    request.setAttribute("r1",books);
    //重定向推数据
    out.print("<hr>");
    response.sendRedirect("/index.jsp");

%>
</body>
</html>
